<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>宿院短租平台</title>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" src="/js/materialize.min.js"></script>
    <script type="text/javascript" src="/js/index.bundle.js"></script>
    <link rel="stylesheet" href="/css/materialize-icon.css"/>
    <link rel="stylesheet" href="/css/user.css"/>
    <link rel="icon" href="/img/logo.jpg" type="image/x-icon"/>
    <link rel="stylesheet" href="/css/index.css"/>
    <script>
        $(document).ready(function () {
            //加载头部,不加参数发送 Get 请求
            $("#homeGoods-header").load("/goods/goodsHeader");
            $("#homeGoods-ng").load("/goods/catelogNavigation");
        });

        //获取物品详情页面
        function getGoodsDetail(goodsId) {
            $("#homeGoods-content").load("/goods/goodsId/" + goodsId + ".html",function (data) {
                  //alert(data);
            });
        }

        //获取分类物品
        function getGoodsByCid(cid) {
            $(".main-content").load("/goods/catelog/" + cid + ".html");
        }

        //获取搜索物品
        function getSeareachGoods(){
            var str = $(":text").val();
            $(".main-content").load("/goods/search",{str:str});
            return false;//阻止表单提交
        }


    </script>
</head>
<body ng-view="ng-view" id="homeGoods-body">
<!--加载头部-->
<div id="homeGoods-header"></div>

<div id="homeGoods-content">
    <!--
    描述：左侧导航条
    -->
    <div ng-controller="sidebarController" class="sidebar stark-components ng-scope" id="homeGoods-ng">
        <!-- js 加载物品目录信息 -->
    </div>
    <!--
        描述：右侧显示部分
    -->
    <div class="main-content">
        <!--
            描述：右侧banner（图片）部分
        -->
        <div class="slider-wapper">
            <div class="slider"
                 style="height: 440px; touch-action: pan-y; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">
                <ul class="slides" style="height: 400px;">
                    <li class="active" style="opacity: 1;">
                        <a href="/goods/homeGoods">
                            <div class="bannerimg">
                                <ul class="bannerul">
                                    <p class="text1">Hello：</p>
                                    <p class="text2">欢迎来到宿州学院校园短租平台。临近毕业季的</p>
                                    <p class="text3">你，是否有太多的闲置与校友分享，为了追求更好的校园服</p>
                                    <p class="text4">务，我们打造了一个全新的校园平台——<span>宿院短租平台</p>
                                    <p class="text5">这里有更多的闲置分享，更自由的校园话题讨论，你想要的，都在这里。</p>
                                    <p class="text6">加入宿院短租平台，你的大学，应更精彩。</p>
                                </ul>
                                <!--   <div class="logoimg">
                                      <img src="../img/p_logo.jpg" />
                                  </div> -->
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <!--
            描述：最新发布
        -->
        <div class="index-title">
            <a href="">最新发布</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <!--/*@thymesVar id="catelogGoods" type="java.util.Map"*/-->
                <div class="card col" th:each="item : ${catelogGoods}" th:if="${catelogGoods != null}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                            <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.contains(item.value.imgUrl,'sysecondhandmarket')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <!--

            描述：闲置数码
        -->
        <div class="index-title">
            <a href="">闲置数码</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods1}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                            <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <!--
            描述：校园代步
        -->
        <div class="index-title">
            <a href="">校园代步</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods2}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                             <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <!--
            电器日用
        -->
        <div class="index-title">
            <a href="">电器日用</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods3}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                            <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="index-title">
            <a href="">图书教材</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods4}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                             <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="index-title">
            <a href="">美妆衣物</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods5}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                             <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="index-title">
            <a href="">运动棋牌</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods6}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                             <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
        <div class="index-title">
            <a href="">票券小物</a>
            <hr class="hr1">
            <hr class="hr2">
        </div>
        <div class="waterfoo stark-components row">
            <div class="item-wrapper normal">
                <div class="card col" th:each="item : ${catelogGoods7}">
                    <a href="javascript:void(0)" th:onclick="'javascript:getGoodsDetail('+${item.key.id}+')'">
                        <div class="card-image">
                             <img th:src="@{/upload/{id}(id=${item.value.imgUrl})}" th:if="${item.value != null and ! #strings.startsWith(item.value.imgUrl,'http://')}"/>
                            <img th:src="@{{imgUrl}(imgUrl=${item.value.imgUrl})}" th:if="${item.value != null and #strings.startsWith(item.value.imgUrl,'http://')}"/>
                        </div>
                        <div class="card-content item-price">
                            <span th:text="${item.key.price}"></span>
                        </div>
                        <div class="card-content item-name">
                            <p><span th:text="${item.key.name}"></span></p>
                        </div>
                        <div class="card-content item-location">
                            <p>宿州学院</p>
                            <p th:text="${item.key.startTime}"></p>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

<
</body>
</html>